package com.emergency.direct;

import com.emergency.common.util.IdWorker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Created by lijie on 2019/9/23.
 * 指挥作业系统
 */
@SpringBootApplication
@EnableSwagger2
@ComponentScan(basePackages = {"com.emergency.**"})
@EntityScan(basePackages={"com.emergency.***.domain"})
public class DirectApplication {

    private final static Logger logger = LoggerFactory.getLogger(DirectApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(DirectApplication.class);
        logger.info("指挥系统项目启动成功---success！！！");
    }

    @Bean
    public IdWorker idWorker(){
        return new IdWorker(1, 1);
    }


}
